import { Map } from "immutable";
import * as actionTypes from "./constance";

const defaultState = Map({
  programDetailInfo: [],
  commentInfo: [],
});

const a = (state = defaultState, action) => {
  switch (action.type) {
    case actionTypes.GET_PROGRAM_DETAIL:
      return state.set("programDetailInfo", action.programDetailInfo);
    case actionTypes.GET_COMMENT_DJ:
      return state.set("commentInfo", action.commentInfo);
    default:
      return state;
  }
};

export default a;
